{include file="common@public/_category" /}

  <!--container-->
  <div class="container container-gary">
      <!-- member index -->
      <div class="m-ptb wrap clearfix">
          {include file="common@public/_personal_left"}
          <form action="" method='post'>
          <div class="member-right">
              <div class="member-sign clearfix">
                  <b>新建子账户</b>
                  <div class="address-span">
                    <input class="address-s-color" type="submit" value="保存" />
                    <input type="button" value="取消" onclick="location.href='{:url('member/subbill')}'" />
                 </div>
              </div>
              <div class="member-order min-height">
                  <div class="member-t-gary clearfix">
                      <h3>基本信息</h3>
                  </div>
                  
                  <div class="m-safe-info">
                      <div class="m-safe-enter clearfix">
                          <div class="m-safe-txt"><span class="red">*</span> 子账号：</div>
                          <div class="m-safe-right">
                              <input class="safe-input safe-w1" type="text" name='subbillname' placeholder="请输入子账号" required/>
                          </div>
                      </div>
                      <div class="m-safe-enter clearfix">
                          <div class="m-safe-txt"><span class="red">*</span> 子账号姓名：</div>
                          <div class="m-safe-right">
                              <input class="safe-input safe-w1" type="text" name='name' placeholder="请输入子账号姓名" required />
                          </div>
                      </div>
                      <div class="m-safe-enter clearfix">
                          <div class="m-safe-txt">QQ：</div>
                          <div class="m-safe-right">
                              <input class="safe-input safe-w1" type="text" name='qq' placeholder="请输入QQ号码 " />
                          </div>
                      </div>
                      <div class="m-safe-enter clearfix">
                          <div class="m-safe-txt"><span class="red">*</span> 登录密码：</div>
                          <div class="m-safe-right">
                              <input class="safe-input safe-w1" type="password" placeholder="请输入登录密码"  name='pwd' required/>
                          </div>
                      </div>
                      <div class="m-safe-enter clearfix">
                          <div class="m-safe-txt">角色：</div>
                          <div class="m-safe-right">
                              <select class="company-select" name='roleid'>
                              <option value=''>请选择角色</option>
                              {foreach name='role_list' item='vo'}
                              <option value='{$vo.roleid}'>{$vo.rolename}</option>
                              {/foreach}
                              </select>
                          </div>
                      </div>
                  </div>
                  
              </div>
          </div>
      </div>
      </form>

  </div>
<!-- menu -->
<script type="text/javascript" src="js/menu.js"></script>
<script>
    $(function(){
      //top select
      $(".top-select").mouseover(function () {
        $(".top-s-text").show();
      })
      $(".top-select").mouseout(function () {
        $(".top-s-text").hide();
      })
      $(".top-s-text div").click(function () {
        var selecttext = $(this).text();
        $(".top-s-head span").text(selecttext);
        $(this).parent(".top-s-text").hide()
      })
      // top code
      var turn = function(target,time,opts){
      target.find('.top-code').hover(function () {
            $(this).find('.top-c-img').stop().animate(opts[0], time, function () {
			$(this).hide().next().show();
			$(this).next().animate(opts[1],time);
	   });
	   },function(){
	        $(this).find('.top-c-text').animate(opts[0], time, function () {
			    $(this).hide().prev().show();
			    $(this).prev().animate(opts[1],time);
		 });
	     });
        }
        var verticalOpts = [{'width':0},{'width':'80px'}];
        turn($('.top-right'), 150, verticalOpts);
        //menu all
        $(".menu-all div").mouseenter(function () {
            $(this).addClass("current");
            $(".submenu").show();
        })
       $(".menu-all div").mouseleave(function () {
            $(this).removeClass("current");
            $(".submenu").hide();
        })
        $(".submenu").mouseenter(function(){
           $(this).show();
           $(".menu-all div").addClass("current")
        })
        $(".submenu").mouseleave(function(){
           $(this).hide();
           $(".menu-all div").removeClass("current")
        })
        //left submenu
        $(".submenu ul li").each(function () {
            var $this = $(this);
            var $children = $this.find('.submenu-pro');
            var $otherChildren = $this.siblings('li').find('.submenu-pro');
            var $childrenList = $children.children('.submenu-total');
            $this.on({
                'mouseenter': function () {
                    $children.css({ 'display': 'block', 'width': 221 * parseInt($childrenList.size()) });
                    $otherChildren.css('display', 'none');
                },
                'mouseleave': function () {
                    $children.css('display', 'none');
                }
            })
        });

        //member left
        $(".member-l-title").click(function(){
           $(this).parent(".member-l-list").toggleClass("m-current");
           $(this).parent(".member-l-list").find("ul").slideToggle()
        })
    })
</script>
</body>
</html>